import socketIo from "socket.io-client";
export default {
	data() {
		return {
			socket: null,
		};
	},
	mounted() {
		if (location.href.includes('39.99.165.58')) {
      var url = 'http://39.99.165.58:10086'
    } else if (location.href.includes('39.101.132.114')) {
      var url = 'http://39.101.132.114:10086'
    } else {
      var url = 'http://39.100.247.202:10086'
    }
		this.socket = socketIo(url)
	},
	beforeDestroy() {
		this.socket.removeAllListeners();
	},
};
